package com.ruoyi.message.config;

import com.ruoyi.message.service.WebSocketEndPoint;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @Author: zhuhongyang
 * @Description:
 * @Date: Create in 14:29 2023/7/17
 * @Modified By:
 */
@Configuration
public class WebSocketConfig {
    private static final Logger log = LoggerFactory.getLogger(WebSocketEndPoint.class);
    /**
     * 给spring容器注入这个ServerEndpointExporter对象
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        log.info("注册成功");
        return new ServerEndpointExporter();
    }
}
